package pdd;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author zhangmin
 * @create 2022-03-20 20:07
 */
public class PDD_0320_3 {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int k=cin.nextInt();
        cin.nextLine();
        char[] b=cin.nextLine().toCharArray();
        char[] a=new char[b.length];
        Arrays.fill(a,'0');
        int n=b.length;
        for (int i = 0; i < n; i++) {
            if(a[i]=='1') continue;
            if (i-k<0){
                if (b[i+k]=='1'){
                    if (i+2*k<n){
                        a[i]='0';
                        a[i+k+k]='1';
                    }else {
                        a[i]='1';
                    }
                }
            }else if(i+k>=n){
                if (a[i]=='1')continue;
                else a[i]='0';
            }else {
                if(b[i-k]=='1'||b[i+k]=='1'){
                    a[i]='1';
                }
            }
        }
        System.out.println(String.valueOf(a));
    }
}
